using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class JobSeekers_other : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session.Contents["jsuserid"] == null)
        {
            Response.Redirect("login.aspx");
        }
        if(Session["ResumeID"]==null)
        {
            Response.Redirect("resume.aspx");
        }
    }


    protected void btnComplete_Click(object sender, EventArgs e)
    {
        if(txtStrength.Text!="" || 
        txtStrength.Text!="" || 
        txtWeekness.Text!="" ||        
        txtHobbies.Text!="" ||
        txtFamily.Text!="" ||
        txtReference.Text!="")
        {
            SQLServerClass cls = new SQLServerClass();
            if (!cls.AddNewUpdateResume(true,
             Convert.ToString(Session["ResumeID"]),
            txtStrength.Text, txtWeekness.Text,        
            txtHobbies.Text,
            txtFamily.Text,
            txtReference.Text))
                literalError.Text = "Error: " + cls.ErrorMessage;
            else
            {
                Session.Remove("ResumeID");
                Response.Redirect("thankyou.aspx");
            }
        }
        else
        {
            Session.Remove("ResumeID");
            Response.Redirect("thankyou.aspx");
        }
    }
}
